extends Talent

func init():
	name = "心智回收"
func _connect():
	sys.main.connect("onBattleStart",self,"onBattleStart")

func onBattleStart():
	for i in sys.main.btChas:
		if i.team == 1:
			i.addBuff(b_al_deathPt.new(lv))

class b_al_deathPt:
	extends "../../azurlane_ctrl/AzurBuff.gd"
	var tlv
	func _init(tlv = 1):
		attInit()
		id = "b_al_deathPt"	
		dispel = 2
		self.tlv = tlv
	func _connect():
		masCha.connect("onDeath",self,"_onDeath")
	func _onDeath(atkInfo):
		sys.main.player.plusGold(tlv+1)
		isDel = true
#1 2 3 4 5
func get_info():
	return "我方[非召唤]舰娘彻底阵亡后，获得%d金币"%[lv+1]

